<template>
	<view>
		<uNavbar title="我的等级"></uNavbar>
		<view class="level_box flex_Z">
			<view class="level mart flex_dq">
				<text class="f30 c3">当前等级：</text>
				<text class="f36 c3"> {{gradeInfo.level_format}}</text>
			</view>
			<view class="level center flex_dq">
				<text class="f26 c4">当前战力：</text>
				<text class="f30 c3">{{gradeInfo.initial_ce}}</text>
			</view>
			<view class="level flex_dq">
				<text  class="f26 c4">还需 </text>
				<text  class="f30 c3 marlr"> {{gradeInfo.disparity_ce}}战力值,</text>
				<text  class="f26 c4">可升级至</text>
				<text  class="f30 c3 marlr">{{gradeInfo.disparity_name}} </text>
			</view>
			<image class="dengji" :src="gradeInfo.level_images? gradeInfo.level_images :'../../static/icon/level1.png'" mode="aspectFill"></image> 
			<view class="jindu">
				<u-line-progress :percentage="gradeInfo.disparity_proportion" :showText="false" activeColor="#FF2CDF" inactiveColor="#dedede" height="6" ></u-line-progress>
			</view>
		</view>
		<view class="explain_box flex_Z">
			<text>等级说明</text>
			<view class="explain">
				<image :src="levelImages" mode="aspectFit"></image>
			</view>
		</view>
		<view class="empty3"></view>
	</view>
</template>

<script>
	import {memberLevel} from '../../api/other.js'
	export default {
		data() {
			return {
				levelImages:'',
				gradeInfo:{}
			}
		},
		onLoad() {
			this.levelDetalis()
		},
		methods: {

			levelDetalis() {
				memberLevel().then(res => {
					console.log(res)
					if(res.code == 1){
						this.levelImages = res.data.level_images
						this.gradeInfo = res.data.member_info
					}
				})
			}
		},
	}
</script>
<style>
	page {
	background: #E0DDDA;
	}
</style>
<style scoped>
	.level_box{
		position: relative;
		width: 690rpx;
		height: 316rpx;
		background: #F2F2F2;
		border-radius: 22rpx;
		margin: 30rpx auto;
	}
	.level{
		margin-left: 40rpx;
	}
	.mart{
		margin-top: 36rpx;
	}
	.center{
		margin: 36rpx 40rpx;
	}
	.marlr{
		margin: 0 10rpx;
	}
	.explain_box>text{
		font-size: 36rpx;
		font-weight: 700;
		color: #333;
		margin: 30rpx 40rpx;
	}
	.explain{
		width: 92%;
		height: 1000rpx;
		margin: 0 auto;
		overflow: auto;
	}
	.explain>image{
		width: 100%;
		height: 100%;
	}
	.dengji{
		position: absolute;
		right: 42rpx;
		top: 40rpx;
		width: 114rpx;
		height: 114rpx;
	}
	.jindu{
		width: 610rpx;
		margin: 40rpx auto 0;
	}
	/deep/.u-line-progress__line{
		background: linear-gradient( 90deg, #D7BA93 0%, #AB8E68 100%);
	}

</style>